//
//  DTHomeThirdTableViewCell.m
//  DoThinkProperty
//
//  Created by YangJian on 15/9/23.
//  Copyright (c) 2015年 DoThink. All rights reserved.
//

#import "DTHomeThirdTableViewCell.h"
#import "Header.h"
@implementation DTHomeThirdTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _buttonView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
        _buttonView.backgroundColor = [UIColor lightGrayColor];
        
        _callButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _callButton.frame = CGRectMake(SCREEN_WIDTH/12 *2, 0, SCREEN_WIDTH/6, SCREEN_WIDTH/6) ;
        [_callButton setBackgroundImage:[UIImage imageNamed:@"button1.png"] forState:UIControlStateNormal];
        [_callButton setTitle:@"对讲" forState:UIControlStateNormal];
        _callButton.titleLabel.font = [UIFont systemFontOfSize:13];
         [_callButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _callButton.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;
        _callButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
        _callButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, SCREEN_WIDTH/16, 0);
        _callButton.titleEdgeInsets = UIEdgeInsetsMake(SCREEN_HEIGHT/8, 0, 0, 0);
        //_callButton.imageView.frame.size.height+
        
        _guardButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _guardButton.frame = CGRectMake(SCREEN_WIDTH/12 *5, 0, SCREEN_WIDTH/6, SCREEN_WIDTH/6);
        [_guardButton setBackgroundImage:[UIImage imageNamed:@"button2.png"] forState:UIControlStateNormal];
        [_guardButton setTitle:@"门禁视频" forState:UIControlStateNormal];
        _guardButton.titleLabel.font = [UIFont systemFontOfSize:13];
        [_guardButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _guardButton.contentHorizontalAlignment = UIControlContentVerticalAlignmentFill;
        _guardButton.contentHorizontalAlignment = UIControlContentVerticalAlignmentCenter;
        _guardButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, SCREEN_WIDTH/16, 0);
        _guardButton.titleEdgeInsets = UIEdgeInsetsMake(SCREEN_HEIGHT/8, 0, 0, 0);
        

        _managementCenterButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _managementCenterButton.frame = CGRectMake(SCREEN_WIDTH/12 *8, 0, SCREEN_WIDTH/6, SCREEN_WIDTH/6);
        [_managementCenterButton setBackgroundImage:[UIImage imageNamed:@"button3.png"] forState:UIControlStateNormal];
        [_managementCenterButton setTitle:@"物业中心" forState:UIControlStateNormal];
        _managementCenterButton.titleLabel.font = [UIFont systemFontOfSize:13];
        _managementCenterButton.titleLabel.textColor = [UIColor blackColor];
        [_managementCenterButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _managementCenterButton.contentHorizontalAlignment = UIControlContentVerticalAlignmentFill;
        _managementCenterButton.contentHorizontalAlignment = UIControlContentVerticalAlignmentCenter;
        _managementCenterButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, SCREEN_WIDTH/16, 0);
        _managementCenterButton.titleEdgeInsets = UIEdgeInsetsMake(SCREEN_HEIGHT/8, 0, 0, 0);

        
        

        [self.contentView addSubview:_buttonView];
        [_buttonView addSubview:_callButton];
        [_buttonView addSubview:_guardButton];
        [_buttonView addSubview:_managementCenterButton];
    }
    return self;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
